﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QLBH.DAO
{
    class DAO_HopDong
    {
        public DAO_HopDong(string fileName)
        {
            Connecttion_Excel.connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source='"+fileName+"';Extended Properties=Excel 8.0";
            Connecttion_Excel.StartConnect();
        }
        public DataTable GetData(string table, String from,string to)
        {
            String sqlGetData = String.Format("select * from [{0}${1}]", table, "A"+from+":AL"+to);
            return Connecttion_Excel.GetDatatable(sqlGetData);
        }
    }
}
